package com.sgcc.ln.pmos.common.bean;

import android.text.TextUtils;

import java.io.Serializable;
import java.math.BigDecimal;

public class PowMonth implements Serializable {

    public PowMonth() {
    }

    private int monthDate;
    private String rEnergy = "";
    private String rEnergy1 = "";
    private String rEnergy2 = "";
    private String rEnergy3 = "";
    private String rEnergy4 = "";
    private String rEnergy5 = "";
    private String rEnergy6 = "";
    private String rEnergy7 = "";
    private String rEnergy8 = "";
    private String rEnergy9 = "";
    private String rEnergy10 = "";
    private String rEnergy11 = "";
    private String rEnergy12 = "";
    private String rEnergy13 = "";
    private String rEnergy14 = "";
    private String rEnergy15 = "";
    private String rEnergy16 = "";
    private String rEnergy17 = "";
    private String rEnergy18 = "";
    private String rEnergy19 = "";
    private String rEnergy20 = "";
    private String rEnergy21 = "";
    private String rEnergy22 = "";
    private String rEnergy23 = "";
    private String rEnergy24 = "";

    public int getMonthDate() {
        return monthDate;
    }

    public void setMonthDate(int monthDate) {
        this.monthDate = monthDate;
    }

    public String getREnergy() {
        return rEnergy;
    }

    public void setREnergy(String rEnergy) {
        this.rEnergy = rEnergy;
    }

    public String getREnergy1() {
        if(TextUtils.isEmpty(rEnergy1)){
            return rEnergy1;
        }else{
            return convertDoubleToString(rEnergy1);
        }

    }

    public void setREnergy1(String rEnergy1) {
        this.rEnergy1 = rEnergy1;
    }

    public String getREnergy2() {
        if(TextUtils.isEmpty(rEnergy2)){
            return rEnergy2;
        }else{
            return convertDoubleToString(rEnergy2);
        }
    }

    public void setREnergy2(String rEnergy2) {
        this.rEnergy2 = rEnergy2;
    }

    public String getREnergy3() {
        if(TextUtils.isEmpty(rEnergy3)){
            return rEnergy3;
        }else{
            return convertDoubleToString(rEnergy3);
        }
    }

    public void setREnergy3(String rEnergy3) {
        this.rEnergy3 = rEnergy3;
    }

    public String getREnergy4() {
        if(TextUtils.isEmpty(rEnergy4)){
            return rEnergy4;
        }else{
            return convertDoubleToString(rEnergy4);
        }
    }

    public void setREnergy4(String rEnergy4) {
        this.rEnergy4 = rEnergy4;
    }

    public String getREnergy5() {
        if(TextUtils.isEmpty(rEnergy5)){
            return rEnergy5;
        }else{
            return convertDoubleToString(rEnergy5);
        }
    }

    public void setREnergy5(String rEnergy5) {
        this.rEnergy5 = rEnergy5;
    }

    public String getREnergy6() {
        if(TextUtils.isEmpty(rEnergy6)){
            return rEnergy6;
        }else{
            return convertDoubleToString(rEnergy6);
        }
    }

    public void setREnergy6(String rEnergy6) {
        this.rEnergy6 = rEnergy6;
    }

    public String getREnergy7() {
        if(TextUtils.isEmpty(rEnergy7)){
            return rEnergy7;
        }else{
            return convertDoubleToString(rEnergy7);
        }
    }

    public void setREnergy7(String rEnergy7) {
        this.rEnergy7 = rEnergy7;
    }

    public String getREnergy8() {
        if(TextUtils.isEmpty(rEnergy8)){
            return rEnergy8;
        }else{
            return convertDoubleToString(rEnergy8);
        }
    }

    public void setREnergy8(String rEnergy8) {
        this.rEnergy8 = rEnergy8;
    }

    public String getREnergy9() {
        if(TextUtils.isEmpty(rEnergy9)){
            return rEnergy9;
        }else{
            return convertDoubleToString(rEnergy9);
        }
    }

    public void setREnergy9(String rEnergy9) {
        this.rEnergy9 = rEnergy9;
    }

    public String getREnergy10() {
        if(TextUtils.isEmpty(rEnergy10)){
            return rEnergy10;
        }else{
            return convertDoubleToString(rEnergy10);
        }
    }

    public void setREnergy10(String rEnergy10) {
        this.rEnergy10 = rEnergy10;
    }

    public String getREnergy11() {
        if(TextUtils.isEmpty(rEnergy11)){
            return rEnergy11;
        }else{
            return convertDoubleToString(rEnergy11);
        }
    }

    public void setREnergy11(String rEnergy11) {
        this.rEnergy11 = rEnergy11;
    }

    public String getREnergy12() {
        if(TextUtils.isEmpty(rEnergy12)){
            return rEnergy12;
        }else{
            return convertDoubleToString(rEnergy12);
        }
    }

    public void setREnergy12(String rEnergy12) {
        this.rEnergy12 = rEnergy12;
    }

    public String getREnergy13() {
        if(TextUtils.isEmpty(rEnergy13)){
            return rEnergy13;
        }else{
            return convertDoubleToString(rEnergy13);
        }
    }

    public void setREnergy13(String rEnergy13) {
        this.rEnergy13 = rEnergy13;
    }

    public String getREnergy14() {
        if(TextUtils.isEmpty(rEnergy14)){
            return rEnergy14;
        }else{
            return convertDoubleToString(rEnergy14);
        }
    }

    public void setREnergy14(String rEnergy14) {
        this.rEnergy14 = rEnergy14;
    }

    public String getREnergy15() {
        if(TextUtils.isEmpty(rEnergy15)){
            return rEnergy15;
        }else{
            return convertDoubleToString(rEnergy15);
        }
    }

    public void setREnergy15(String rEnergy15) {
        this.rEnergy15 = rEnergy15;
    }

    public String getREnergy16() {
        if(TextUtils.isEmpty(rEnergy16)){
            return rEnergy16;
        }else{
            return convertDoubleToString(rEnergy16);
        }
    }

    public void setREnergy16(String rEnergy16) {
        this.rEnergy16 = rEnergy16;
    }

    public String getREnergy17() {
        if(TextUtils.isEmpty(rEnergy17)){
            return rEnergy17;
        }else{
            return convertDoubleToString(rEnergy17);
        }
    }

    public void setREnergy17(String rEnergy17) {
        this.rEnergy17 = rEnergy17;
    }

    public String getREnergy18() {
        if(TextUtils.isEmpty(rEnergy18)){
            return rEnergy18;
        }else{
            return convertDoubleToString(rEnergy18);
        }
    }

    public void setREnergy18(String rEnergy18) {
        this.rEnergy18 = rEnergy18;
    }

    public String getREnergy19() {
        if(TextUtils.isEmpty(rEnergy19)){
            return rEnergy19;
        }else{
            return convertDoubleToString(rEnergy19);
        }
    }

    public void setREnergy19(String rEnergy19) {
        this.rEnergy19 = rEnergy19;
    }

    public String getREnergy20() {
        if(TextUtils.isEmpty(rEnergy20)){
            return rEnergy20;
        }else{
            return convertDoubleToString(rEnergy20);
        }
    }

    public void setREnergy20(String rEnergy20) {
        this.rEnergy20 = rEnergy20;
    }

    public String getREnergy21() {
        if(TextUtils.isEmpty(rEnergy21)){
            return rEnergy21;
        }else{
            return convertDoubleToString(rEnergy21);
        }
    }

    public void setREnergy21(String rEnergy21) {
        this.rEnergy21 = rEnergy21;
    }

    public String getREnergy22() {
        if(TextUtils.isEmpty(rEnergy22)){
            return rEnergy22;
        }else{
            return convertDoubleToString(rEnergy22);
        }
    }

    public void setREnergy22(String rEnergy22) {
        this.rEnergy22 = rEnergy22;
    }

    public String getREnergy23() {
        if(TextUtils.isEmpty(rEnergy23)){
            return rEnergy23;
        }else{
            return convertDoubleToString(rEnergy23);
        }
    }

    public void setREnergy23(String rEnergy23) {
        this.rEnergy23 = rEnergy23;
    }

    public String getREnergy24() {
        if(TextUtils.isEmpty(rEnergy24)){
            return rEnergy24;
        }else{
            return convertDoubleToString(rEnergy24);
        }
    }

    public void setREnergy24(String rEnergy24) {
        this.rEnergy24 = rEnergy24;
    }


    private String convertDoubleToString(String num) {
        BigDecimal bd = new BigDecimal(num);
        return bd.setScale(3, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString();

    }
}
